package com.heima.service.impl;

import com.heima.dao.PersonDao;
import com.heima.pojo.Person;
import com.heima.service.PersonService;

import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.Set;

public class PersonServiceImpl implements PersonService {
    private PersonDao personDao;

    private int id;
    private String name;

    private String[] hobby;

    private List<String> adut;

    private Set<String> bba;

    //引用类型
    private List<Person> personList;

    public void setPersonList(List<Person> personList) {
        this.personList = personList;
    }

    private Map<String,String> Adress;

    public void setBba(Set<String> bba) {
        this.bba = bba;
    }

    public void setHobby(String[] hobby) {
        this.hobby = hobby;
    }

    public void setAdut(List<String> adut) {
        this.adut = adut;
    }

    public void setAdress(Map<String, String> adress) {
        Adress = adress;
    }

    public void setId(int id) {
        this.id = id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setPersonDao(PersonDao personDao) {
        this.personDao = personDao;
    }

    @Override
    public void save() {
        personDao.save();
        System.out.println("PersonService save ...");
        System.out.println("id =" + id);
        System.out.println("name =" + name);
        System.out.println("hobby =" + Arrays.toString(hobby));
        System.out.println("adut =" + adut);
        System.out.println("bba =" + bba);
        System.out.println("personList =" + personList);
        System.out.println(Adress);

    }
}
